<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>企业信息</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="../../../elementUI/index.css">
  <link rel="stylesheet" href="../../../css/index.css">
  <!-- 解决页面加载瞬间出现双花括号问题 -->
  <style>
    [v-clock] {
      display: none;
    }

    .span {
      display: block;
      width: 250px;
      height: 40px;
      line-height: 40px;
      font-size: 14px;
    }
    .el-input .el-input__inner ,.el-input.is-disabled .el-input__inner ,
    .el-textarea .el-textarea__inner ,.el-textarea.is-disabled .el-textarea__inner{
      color: #000;
      background-color: #ffffff00;
    }
  </style>
</head>

<body>
  <div id="app" v-clock class="minWidth">
    <el-form :model="form" inline-message="true" style="width: 100%">
      <div class="table_titel">
        <div class="titel">企业基本信息</div>
      </div>
      <div style="display: flex;">
        <el-form-item>
          <div class="preview" v-show="form.Enterprise_Logo||!isEdit">
            <el-image class="el-upload-list__item-thumbnail" style="width: 148px; height: 148px"
              :src="Domain_Business+form.Enterprise_Logo" fit="contain">
              <div slot="error" class="image-slot" style="display: flex;flex-direction: column;">
                <i class="el-icon-picture-outline"></i>
                <span style="font-size: 12px;">未上传logo</span>
              </div>
            </el-image>
            <span v-show="isEdit" class="el-upload-list__item-actions">
              <span @click="handlePictureCardPreview(Domain_Business+form.Enterprise_Logo)"><i
                  class="el-icon-zoom-in"></i></span>
              <span @click="handleRemove()"><i class="el-icon-delete"></i></span>
            </span>
          </div>
          <el-upload v-show="isEdit&&!form.Enterprise_Logo" class="upload-demo" :show-file-list="false"
            list-type="picture-card" action="" accept="image/*" :before-upload="uploadFront">
            <i slot="default" class="el-icon-plus"></i>
          </el-upload>
        </el-form-item>
        <el-descriptions border style="flex: 1;" :column="3" border size="small">
          <el-descriptions-item label="企业名称">
            <el-form-item prop="Enterprise_Name">
              <el-input :disabled="!isEdit" v-model.trim="form.Enterprise_Name" placeholder="请输入企业名称"></el-input>
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item label="营业执照注册号">
            <el-form-item prop="Tax_Number">
              <el-input :disabled="!isEdit" v-model.trim="form.Tax_Number" placeholder="请输入企业名称"></el-input>
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item label="邮政编码">
            <el-form-item prop="Postal_Code">
              <el-input :disabled="!isEdit" v-model.trim="form.Postal_Code" placeholder="请输入邮政编码"></el-input>
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item label="企业电话">
            <el-form-item prop="Enterprise_Phone">
              <el-input :disabled="!isEdit" v-model.trim="form.Enterprise_Phone" placeholder="请输入企业名称"></el-input>
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item label="联系人姓名">
            <el-form-item prop="Enterprise_Contacts">
              <el-input :disabled="!isEdit" v-model.trim="form.Enterprise_Contacts" placeholder="请输入联系人姓名"></el-input>
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item label="联系人手机号">
            <el-form-item prop="Enterprise_Contacts_Mobile">
              <el-input :disabled="!isEdit" v-model.trim="form.Enterprise_Contacts_Mobile" placeholder="请输入联系人手机号"></el-input>
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item label="存货计算方案">
            <el-form-item prop="Calculation_SerialNumber">
              <el-select :disabled="!isEdit||isCalculation" v-model="form.Calculation_SerialNumber" filterable size="small" placeholder="请选择仓库计算方案" style="width: 50%;">
                <el-option v-for="(item, index) in calculation" :value="item.Calculation_SerialNumber" :label="item.Calculation_Name"  :key="index"></el-option>
              </el-select>
              <span v-if="isCalculation" style="color: red;">无法修改</span>
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item label="电子邮箱">
            <el-form-item prop="E_Mail">
              <el-input :disabled="!isEdit" v-model.trim="form.E_Mail" placeholder="请输入电子邮箱"></el-input>
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item label="企业地址">
            <el-input disabled v-model.trim="form.Enterprise_Address" placeholder="请输入企业地址"></el-input>
          </el-descriptions-item>
        </el-descriptions>
      </div>
      <div class="table_titel">
        <div class="titel">银行账户信息{{form.Children.enterprise_account.length==0?'(暂未录入银行账户信息)':''}}</div>
        <div class="operation" v-if="isEdit">
          <el-button type="primary" size="small" @click="add_enterprise_account">新增</el-button>
          <el-button type="danger" size="small" @click="remove_enterprise_account">删除</el-button>
        </div>
      </div>
      <el-descriptions :column="3" size="small" border v-for="(item,index) in form.Children.enterprise_account.filter(item => item.Row_Status != '1')"
        :key="index">
        <el-descriptions-item label="账户名称">
          <el-form-item prop="Account_Name">
            <el-input :disabled="!isEdit" v-model.trim="item.Account_Name" placeholder="请输入账户名称"></el-input>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="开户银行">
          <el-form-item prop="Bank_Name">
            <el-select :disabled="!isEdit" v-model.trim="item.Bank_Name" placeholder="请选择开户银行" filterable style="width: 100%">
              <el-option label="中国建设银行" value="中国建设银行"></el-option>
              <el-option label="中国农业银行" value="中国农业银行"></el-option>
            </el-select>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="银行账户">
          <el-form-item prop="Account_Number">
            <el-input :disabled="!isEdit" v-model.trim="item.Account_Number" placeholder="请输入银行账户"></el-input>
          </el-form-item>
        </el-descriptions-item>
      </el-descriptions>
      <el-form-item class="form-operation">
        <el-button @click="window.history.back()">返回</el-button>
        <el-button type="primary" @click="editMember()" :loading="loading">{{isEdit?'保存':'完善企业信息'}}</el-button>
      </el-form-item>
    </el-form>
    <el-dialog :visible.sync="dialogVisible">
      <img width="100%" :src="dialogImageUrl" alt="">
    </el-dialog>
  </div>
  <script type="text/javascript" src="../../../js/jquery-3.6.0.min.js"></script>
  <script type="text/javascript" src="../../../js/jquery.cookie.js"></script>
  <script type="text/javascript" src="../../../js/vue.min.js"></script>
  <script type="text/javascript" src="../../../elementUI/index.js"></script>
  <script type="text/javascript" src="../../../js/utils.js"></script>
  <script type="text/javascript" src="../../../js/ID_Validity.js"></script>
  <script type="text/javascript" src="../../../js/compressor.js"></script>
  <script type="text/javascript" src="../../../js/FileSaver.min.js"></script>
  <script type="text/javascript" src="../../../js/FileSaver.js"></script>
  <script type="text/javascript" src="../../../js/xlsx.full.min.js"></script>
  <script type="text/javascript" src="./js/Business.js"></script>
</body>

</html>